/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-03-07     86188       the first version
 */
#ifndef APPLICATIONS_HEADER_FILE_FM25V05_H_
#define APPLICATIONS_HEADER_FILE_FM25V05_H_

/* FM25V05 contral command */
#define     WREN            0x06                        // Set Write Enable Latch
#define     WRDI            0x04                        // Write Disable
#define     RDSR            0x05                        // Read Status Register
#define     WRSR            0x01                        // Write Status Register
#define     READ            0x03                        // Read Memory Data.
#define     FSTRD           0x0B                        // Fast Read Memory Data.
#define     WRITE           0x02                        // Write Memory Data
#define     SLEEP           0xB9                        // Enter Sleep Mode.
#define     RDID            0x9F                        // Read Device ID.
#define     SNR             0xC3                        // Read S/N.


typedef struct
{
    int16_t (*saveData)(uint16_t addr, uint16_t size, uint8_t *buf);
    int16_t (*readData)(uint16_t addr, uint16_t size, uint8_t *buf);
}ExFLASH_HandleTypedef;
extern ExFLASH_HandleTypedef ExFlash_Handle;

#endif /* APPLICATIONS_HEADER_FILE_FM25V05_H_ */
